package com.burstly.lib.currency.request;

import com.burstly.lib.currency.AccountInfo;
import com.burstly.lib.currency.UserAccount;
import com.burstly.lib.currency.secured.SecuredRequestBuilder;
import com.burstly.lib.currency.secured.SecuredServiceRequest;
import com.burstly.lib.feature.currency.ICurrencyListener;
import com.burstly.lib.network.request.CurrencyRequestTask;
import com.burstly.lib.util.LoggerExt;
import java.util.List;

class RequestBalanceUpdateRunnable
  implements Runnable
{
  private static final LoggerExt LOG = LoggerExt.getInstance();
  private static final String TAG = RequestBalanceUpdateRunnable.class.getSimpleName();
  private final UserAccount mAccount;
  private final List<ICurrencyListener> mListeners;
  private final AccountInfo mNewAccount;

  RequestBalanceUpdateRunnable(UserAccount paramUserAccount, AccountInfo paramAccountInfo, List<ICurrencyListener> paramList)
  {
    this.mAccount = paramUserAccount;
    this.mNewAccount = paramAccountInfo;
    this.mListeners = paramList;
  }

  public void run()
  {
    FindAccountRequest localFindAccountRequest = new FindAccountRequest();
    localFindAccountRequest.setPublisher(this.mNewAccount.getPubId());
    localFindAccountRequest.setUserUid(this.mNewAccount.getUserId());
    LoggerExt localLoggerExt = LOG;
    String str = TAG;
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = this.mNewAccount;
    localLoggerExt.logDebug(str, "Check actual balance for: {0}", arrayOfObject);
    SecuredServiceRequest localSecuredServiceRequest = new SecuredRequestBuilder().setData(localFindAccountRequest).buildFindAccountRequest();
    LOG.logDebug(TAG, "FindAccountRequest object is : {0}", new Object[] { localFindAccountRequest });
    CurrencyRequestTask localCurrencyRequestTask = new CurrencyRequestTask(localSecuredServiceRequest, AccountInfoResponse.class);
    localCurrencyRequestTask.setCallback(new UpdateCurrencyCallback(this.mListeners, this.mAccount));
    localCurrencyRequestTask.execute(new Void[0]);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.currency.request.RequestBalanceUpdateRunnable
 * JD-Core Version:    0.6.2
 */